<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var name = "张三"
        var obj = {
            name: name,
            arr: [{
                name: "李四",
                age: 27,
            },
            {
                name: "李四",
                age: 23,
            },
            {
                name: "李四",
                age: 26,
            }
            ],
            fn: function () {
                console.log("fn")
            },
            fn1: function () {
                console.log("fn1")
            }
        }
        let res = obj.arr.filter(item => item.age > 25)
        console.log(res)
        // let name = "张三"
        // var obj = {
        //     name,
        //     arr: [{
        //         name: "李四",
        //         age: 27,
        //     },
        //     {
        //         name: "李四",
        //         age: 23,
        //     },
        //     {
        //         name: "李四",
        //         age: 26,
        //     }
        //     ],
        //     fn() {
        //         console.log("fn")
        //     },
        //     fn1: () => {
        //         console.log("fn1")
        //         }
        //     }
    </script>
</body>

</html>